Find & Replace
![](images/replace.png)
The Replace function allows you to look for a certain string within lines and replace it with another string.
- Look For - Enter the string you wish to search for. The following wildcards are allowed:
- Matches zero or more characters:
*
- Matches one or more characters:
:
- Matches exactly one character:
?
Hint: Press the button with an eye icon (or hit F3) to open the Visual Assist window that allows you to visually select the text you want to find!
- Matches zero or more characters:
- Replace With - If the search string is found, it will be replaced with this string. You are allowed to enter <tags> here too!
Hint: Leave this box empty to delete the search string!.
- Case Sensitive - If you want an exact match, check this one. Otherwise, for example "Genius" and "genius" will be interpreted as the same word. Use this if you for example want to change the character case within a single word.
- Swap Mode - Swap mode is a special case where, in addition to "Look" being replaced by "Replace", "Replace" is also replaced by "Look". In other words, the two search strings will be swapped. Note: Swap mode will be ignored if wildcards are used in the find box, since it is not logically possible to conbine the both.
- Skip - You can skip replacing the first # occurances the program finds. Enter 0 to incklude all occurances from the beginning.
- Count - You can limit the number of replaces to perform within each filename by entering a value here. Enter 0 for unlimited.
- Regular Expression - Enable this to turn on regular expressions in the find box (instead of just simple wildcards). RegExp is an advanced method for finding patterns in text. You can think of it like wildcards on steroids. For a reference on how to use regular expression in Replace Genius, please read this page. RegExp in Replace Genius supports capturing patterns. You can then use the captured patterns in the replace box by entering
$1-$9
. Here is an example:Find: (don)[ `┤]?(t)
Replace: $1'$2
This example is taken from the default batch replace list included in Replace Genius It will match all of these: "dont" "don t" "don`t" "don┤t", plus different caption variations, and replace it with "don't" in the same caption as the original!
Although regular expressions look intimidating, they are actually quite easy to construct if you have a basic sense for logic. Take it easy and build them step by step. Remember that regexp are extremely logical, and if you don't get the result you expect you have probably made a mistake.
Batch Replace
![](images/batch_replace.png)
With Batch Replace you can run several Replace commands in one go! Use this for replace operations that you perform all the time. You can modify the list of replace commands from the Settings window. You can also add the current Replace function settings to the list by pressing the button with an exclamation mark! You can add multiple items at the same time if you use the Settings Window.
Note: By default the batch replace list is loaded with words that often need to be corrected! It is recommended that you go through the list before using this function, so you know what words are included.